<template>
    <div class="order-process">
        <order-banner type="工单流程" :detail="detail" />
        <w-table ref="tableRef" :isShowPagination="false" class="order-detail-table" style="height: 250px" :propTableConfig="processTableConfig" />
    </div>
</template>

<script setup>
import orderBanner from "./orderBanner.vue";
import wTable from "@/components/wTable.vue";
import { processTableConfig } from "../config.js";
import { provide, ref, watch } from "vue";
import { getRepairFlow } from "@/service/api/report.js";

const props = defineProps({
    detail: {
        type: Object,
        default: () => ({})
    }
});
const tableRef = ref(null);

watch(
    () => props.detail,
    (val) => {
        getRepairFlow({ id: val.jobOrderId }).then((res) => {
            if (res.code === 200) {
                tableRef.value.tableData = res.data;
            }
        });
    },
    {
        immediate: true
    }
);
provide("isShowSelect", false);
</script>

<style lang="scss" scoped></style>
